import request from '@/config/axios'

// 教师到企业学习 VO
export interface TeacherStudyEnterpriseVO {
  // 编号
  id: number
  // 教师工号
  teacherNumber: string
  // 教师姓名
  teacherName: string
  // 部门id
  deptId: number
  // 方式
  way: number
  // 企业名称
  enterpriseName: string
  // 地点
  location: string
  // 内容
  content: string
  // 时间
  time: string
  // 备注
  remark: string
  // 状态
  status: number
}

// 教师到企业学习 API
export const TeacherStudyEnterpriseApi = {
  // 查询教师到企业学习分页
  getTeacherStudyEnterprisePage: async (params: any) => {
    return await request.get({ url: `/data/teacher-study-enterprise/page`, params })
  },

  // 查询教师到企业学习详情
  getTeacherStudyEnterprise: async (id: number) => {
    return await request.get({ url: `/data/teacher-study-enterprise/get?id=` + id })
  },

  // 新增教师到企业学习
  createTeacherStudyEnterprise: async (data: TeacherStudyEnterpriseVO) => {
    return await request.post({ url: `/data/teacher-study-enterprise/create`, data })
  },

  // 修改教师到企业学习
  updateTeacherStudyEnterprise: async (data: TeacherStudyEnterpriseVO) => {
    return await request.put({ url: `/data/teacher-study-enterprise/update`, data })
  },

  // 修改教师到企业学习
  updateTeacherStudyEnterpriseStatus: async (data) => {
    return await request.put({ url: `/data/teacher-study-enterprise/updateStatus`, data })
  },

  // 删除教师到企业学习
  deleteTeacherStudyEnterprise: async (id: number) => {
    return await request.delete({ url: `/data/teacher-study-enterprise/delete?id=` + id })
  },

  // 导出教师到企业学习 Excel
  exportTeacherStudyEnterprise: async (params) => {
    return await request.download({ url: `/data/teacher-study-enterprise/export-excel`, params })
  }
}
